import { getToken } from '@/utils/auth'

const whiteList = ['/login', '/register', '/social-callback', '/register*', '/register/*']

const isWhiteList = (path: string) => {
  return whiteList.some((item) => path.includes(item))
}

const isLogin = () => {
  const token: string = window.sessionStorage.getItem(process.env.VITE_APP_TOKEN_NAME)!
  return token !== null
}

export { isWhiteList, isLogin }
